<style> .errors{color:red;}</style>
<div class="gb-layout-wrapper">
    <div class="gb-content-layout">
        <div class="gb-content-layout-row">
            <div class="gb-layout-cell gb-sidebar1">

                <!-- navbar2 start here-->
                <?php include(APPLICATION_PATH . "/modules/default/views/scripts/index/navbar2_catalogacion.phtml"); ?>
                <!-- navbar2 finish here-->

                <div class="cleared"></div>
            </div>
            
            <!-- content start here-->
            <div class="gb-layout-cell gb-content">
                
                <!-- -->
                <div class="gb-box gb-post">
                    <div class="gb-box-body gb-post-body">
                        <div class="gb-post-inner gb-article">
                            <h2 class="gb-postheader"><a href="Blog Posts/post.html">Adquiciciones</a></h2>
                            <form name="login" id="login" method="post" action="">
                                <fieldset>
                                    <label for="name">Nombre</label><br />
                                    <?php echo $this->form->name;?>
                                    <div>
                                        <br />
                                    </div>
                                    <label for="detalle">Detalles</label><br />
                                    <?php echo $this->form->detalle;?>
                                    <div>
                                        <br />
                                    </div>
                                    <?php if ($this->form->hiddenedit->getValue() != "none" ) { echo $this->form->hiddenedit; }?>
                                    <div style="float: left;padding-left: 15px;padding-top: 10px;">
                                        <?php 
                                          $getParam = Zend_Controller_Front::getInstance()->getRequest()->getParams();
                                          if (isset($getParam['msg'])) {
                                              switch ($getParam['msg']) {
                                                    case "a1":
                                                        echo "<span style='color:blue;'>La adquicición se guardo correctamente.</span>";
                                                        break;
                                                    case "a2":
                                                        echo "<span class='errors'>No se pudo guardar la adquicición, nombre duplicado.</span>";
                                                        break;
                                                    case "b1":
                                                        echo "<span style='color:blue;'>La adquicición se modifico correctamente.</span>";
                                                        break;
                                                    case "b2":
                                                        echo "<span class='errors'>No se pudo modificar la adquicición, nombre duplicado.</span>";
                                                        break;
                                                }
                                          }
                                        ?>
                                    </div>
                                    <div style="width: auto; float: right;">
                                        <?php echo $this->form->BtnGuardar; ?>
                                    </div><div class="cleared"></div>
                                </fieldset>
                            </form>
                            <br />
                            <form name="search" id="search" method="post" action="">
                                <fieldset>
                                    <div style="text-align: center;">
                                        <label for="searchword">Nombre</label>
                                        <?php echo $this->search->searchword;?>
                                        <?php echo $this->search->BtnSearch; ?>
                                    </div>
                                </fieldset>
                            </form>
                            <div>
                                <br />
                            </div>
                            
                            <div class="cleared"></div>
                            <div class="gb-postcontent">
                                <table class="" style="border-collapse: separate;margin: 0;" cellspacing="0" width="100%">
                                    <thead class="gb-postmetadatafooter" style="border:1px solid #A3BDA5;padding: 1px;position: relative;z-index: 1;">
                                        <th>Nro</th>
                                        <th>Nombre</th>
                                        <th>detalle</th>
                                        <th>&nbsp;</th>
                                    </thead>
                                    <tbody>
                                        <?php $i = 1?>
                                        <?php foreach ($this->adquisiciones as $adquicicion) {?>
                                        <tr>
                                            <td><?php echo $i;?></td>
                                            <td><?php echo $adquicicion->nombre;?></td>
                                            <td><?php echo $adquicicion->detalle;?></td>
                                            <td><a href="<?php echo $this->myUrl(array(), 'home'); ?>catalogacion/adquiciciones/edit/<?php echo $adquicicion->id;?>">Editar</a></td>
                                        </tr>
                                        <?php $i++;?>
                                        <?php }?>
                                    </tbody>
                                </table>
                            </div>
                            

                        </div>
                        <div class="cleared"></div>
                    </div>
                </div>
                <!-- -->
                
                <div class="cleared"></div>
            </div>
            <!-- content finish here-->
        </div>
    </div>
</div>